package legumes.client.services.callbacks;

import legumes.client.services.LegumesServicesHelper;
import legumes.client.services.util.rpc.SequencableRPCCall;
import legumes.shared.domain.CustomerDTO;

public class WhoAmICallback extends SequencableRPCCall<CustomerDTO> {
	private CustomerDTO customerDTO;

	@Override
	protected void doCall() {
		LegumesServicesHelper.LEGUMES_SERVICES.whoAmI(this);
	}

	@Override
	public void onSuccess(CustomerDTO c_) {
		customerDTO = c_;
		callNext();
	}

	public CustomerDTO getCustomerDTO() {
		return customerDTO;
	}

}